﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace ABC_SA_DAL
{
    public class Conexion
    {
        SqlConnection con;

        /*
         * devuelve una conexion a la base de datos
         */

        public SqlConnection Conectar()
        {
            con = new SqlConnection();
            ///////////////////////////////////////////////////////////////////////////////////////////////
            con.ConnectionString = "Data Source=localhost;Initial Catalog=abc_sa;Integrated Security=True;";
            
            try{
                con.Open();
                return con;
            }
            catch (Exception ex)
            {
                return null;
            }
        }
    }
}
